REDIM outstacker(outcondtot, actmax) ' begin an event
COLOR flash, flashback: GOSUB box3
COLOR flash, flashback: GOSUB box4
FOR iew = 1 TO histeventnum
FOR hfs = 1 TO incondtot
IF NOT inhistory(hfs, iew) = currin(hfs) THEN 3527
NEXT hfs
GOTO 3528
3527 NEXT iew
IF tryedsofar = actmax THEN 2906
COLOR flash, flashback: GOSUB box6
2906 'all rec have been looked at, best are loaded
IF tryedsofar < actmax THEN 4560
GOTO 4561 ' skip rnd
3528 IF outhistory(1, iew) = 0 THEN PRINT " ev rec with a zero win act? ": intrmflag = 1: GOTO 8422
FOR wer = 1 TO actmax:
' grab bestscore and act; ' winval may be either goal val or prod VAL
IF goalval(iew) + convcost(iew) > winval THEN winval = goalval(iew) + convcost(iew): winact = outhistory(acnum, iew): FOR hfs = 1 TO outcondtot: currout(hfs) = outhistory(hfs, iew): NEXT hfs
IF prodval(iew) < settlefor THEN 1171
IF prodval(iew) > winval THEN winval = prodval(iew): winact = outhistory(acnum, iew): FOR hfs = 1 TO outcondtot: currout(hfs) = outhistory(hfs, iew): NEXT hfs
1171 FOR hfs = 1 TO outcondtot
IF NOT outhistory(hfs, iew) = outstacker(hfs, wer) THEN 6527
NEXT hfs
GOTO 3527
6527 IF outstacker(1, wer) = 0 THEN tryedsofar = tryedsofar + 1: FOR hfs = 1 TO outcondtot: outstacker(hfs, wer) = outhistory(hfs, iew): NEXT hfs: GOTO 3527
IF prodvalflag = 0 AND goalvalflag = 0 AND byprodflag = 0 THEN GOSUB defaultpp: GOTO 2037
IF compglobalppflag = 1 THEN 8404
REDIM ippnt(incondtot)
8404 FOR ii = 1 TO incondtot: rvr(ii) = ii: NEXT ii
FOR rvcnt = 1 TO incondtot
IF compglobalppflag = 1 THEN mse = histeventnum: GOTO 8405
FOR mse = 1 TO histeventnum 'grab a search record
8405 FOR foc = 1 TO histeventnum 'look at all else
IF foc = mse THEN 117
IF calcnnppalso = 1 AND numneed(foc) > 0 THEN 127
IF calcpospponly = 1 AND prodval(foc) < 1 AND goalval(foc) + convcost(foc) < settlefor THEN 117
IF calcpospponly = 2 AND prodval(foc) < 1 AND goalval(foc) + convcost(foc) < 0 THEN 117
127 IF inhistory((rvr(1)), mse) = inhistory((rvr(1)), foc) THEN 117
FOR jgd = 2 TO incondtot
IF NOT inhistory((rvr(jgd)), mse) = inhistory((rvr(jgd)), foc) OR NOT goalval(mse) + convcost(mse) = goalval(foc) + convcost(foc) OR NOT byprod(objkey, mse) = byprod(objkey, foc) THEN 117 ' NEXT foc
NEXT jgd 'fall thru is an isomer particle of the search rec (mse)
FOR wee = 1 TO incondtot ' stack conditions in pri order
ipbest = 999933: ipwin = 0
FOR ooy = 1 TO incondtot
IF ippntdv(ooy) < ipbest THEN ipbest = ippntdv(ooy): ipwin = ooy
NEXT ooy
winstkdv(wee) = ipwin: ippntdv(ipwin) = 999933
NEXT wee
'fall thru with pripart in winstk(1)etc...
IF usevalppflag = 0 THEN RETURN
IF beginpp > histeventnum THEN RETURN
FOR mmm = 1 TO incondtot
pinstk(mmm) = winstkdv(mmm)
NEXT mmm
2037
LOCATE 7, 1: COLOR lcyan, 0
PRINT " "
LOCATE 7, 1: COLOR lcyan, 0
FOR wx = 1 TO incondtot
PRINT pinstk(wx);
NEXT wx
IF ippnt(objkey) = 0 OR forceobjkeypp = 1 THEN GOSUB defaultppok
RETURN
defaultppo:
FOR ijn = 1 TO outcondtot
poutstk(ijn) = ijn
NEXT ijn
actkey = 1
poutstk(1) = actkey
RETURN
getpartordo:
IF histeventnum < 3 THEN RETURN
IF prodvalflag = 0 AND goalvalflag = 0 AND byprodflag = 0 THEN GOSUB defaultppo: GOTO 9037
IF compglobalppflag = 1 THEN 9404
REDIM oppnt(outcondtot)
9404 FOR ii = 1 TO outcondtot: rvr(ii) = ii: NEXT ii
FOR rvcnt = 1 TO outcondtot
IF compglobalppflag = 1 THEN mse = histeventnum: GOTO 9405
FOR mse = 1 TO histeventnum 'grab a search record
9405 FOR foc = 1 TO histeventnum 'look at all else
IF foc = mse THEN 917
IF calcnnppalso = 1 AND numneed(foc) > 0 THEN 927
IF calcpospponly = 1 AND prodval(foc) < 1 AND goalval(foc) + convcost(foc) < settlefor THEN 917
IF calcpospponly = 2 AND prodval(foc) < 1 AND goalval(foc) + convcost(foc) < 0 THEN 917
927 IF outhistory((rvr(1)), mse) = outhistory((rvr(1)), foc) THEN 917
FOR jgd = 2 TO outcondtot
IF NOT outhistory((rvr(jgd)), mse) = outhistory((rvr(jgd)), foc) OR NOT goalval(mse) = goalval(foc) OR NOT byprod(objkey, mse) = byprod(objkey, foc) THEN 917 ' NEXT foc
NEXT jgd 'fall thru is an isomer particle of the search rec (mse)
oppnt(rvr(1)) = oppnt(rvr(1)) + 1
917 NEXT foc
IF compglobalppflag = 1 THEN 9406
NEXT mse
9406 FOR rx = 1 TO outcondtot 'turn ip revolver
rvr(rx) = rvr(rx) + 1
IF rvr(rx) > outcondtot THEN rvr(rx) = 1
919 NEXT rx
NEXT rvcnt
FOR lll = 1 TO outcondtot
oppntdv(lll) = oppnt(lll)
IF outpartspectrumtot(lll) = 0 THEN 169 'in case corrupt file